import { _decorator, AnimationComponent, Component, SpriteFrame } from 'cc';
import { State } from '../Base/State';
import { FSM_PARAMS_TYPE_ENUM } from '../Enums';
import { StateMachine } from './StateMachine';

export abstract class SubStateMachine {
    private _currentState: State = null;
    stateMachines: Map<string, State> = new Map();

    constructor(public fms: StateMachine) { }


    get currentState() {
        return this._currentState;
    }

    set currentState(newState: State) {
        this._currentState = newState;
        this._currentState.run();
    }

    abstract run(): void
}
